package com.tpshion.cloud.test.controller;

import com.tpshion.cloud.common.support.Result;
import com.tpshion.cloud.core.annotation.Permission;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @GetMapping("/test")
    public Result<String> test(){
        return Result.ok("test service is running...");
    }

    @GetMapping("/auth")
    @Permission("auth")
    public Result<String> auth(){
        return Result.ok("权限测试");
    }

    @GetMapping("/noAuth")
    @Permission("noAuth")
    public Result<String> noAuth(){
        return Result.ok("没有权限测试");
    }

}
